﻿/*
Copyright © 2010 François Karman

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

See <license.txt> for the complete license of the software.
*/

using Microsoft.Build.Framework;

namespace MSBuild.Mercurial
{
    /// <summary>
    /// Excludes some files of the source control on the next commit.
    /// </summary>
    /// <remarks>
    /// The current implementation of the <c>hg forget</c> command has the following
    /// particularities:
    /// <list type="bullet">
    /// <item>
    /// The <see cref="HgForget.Files"/> property is flagged as required to comply
    /// with the <c>hg forget</c> command.
    /// </item>
    /// <item>
    /// The <see cref="HgForget.Include"/> and <see cref="HgForget.Exclude"/> properties
    /// have been created according to the <c>hg forget</c> documentation but their
    /// tests have not been designed as <see cref="HgForget.Files"/> is mandatory and
    /// override those parameters.
    /// </item>
    /// </list>
    /// </remarks>
    [Command("forget")]
    public class HgForget : AbstractHgTask
    {
        /// <summary>
        /// Gets or sets the inclusion pattern.
        /// </summary>
        [Parameter("-I")]
        public string Include { get; set; }

        /// <summary>
        /// Gets or sets the exclusion pattern.
        /// </summary>
        [Parameter("-X")]
        public string Exclude { get; set; }

        /// <summary>
        /// Gets or sets the files to forget during the next commit.
        /// </summary>
        [Required]
        [Parameter("")]
        public ITaskItem[] Files { get; set; }
    }
}
